#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Mikan データベース ツールキット パッケージ

Mikan Python Web Framework
"""

__author__ = "K.Sonohara"
__status__ = "develop"
__version__ = "0.0.0_7"
__date__    = "2013/02/24"
__license__ = 'LGPL'

# ------------------------------------------------------------
## インポート
# ------------------------------------------------------------
# Python

# ESiPC
from esipc import ESiPCProperty
from esipc.resource.iniresource import ESiPCINIFileResourceBundle

# Mikan
from mikan.core import AbstractMikan, MIKAN

# ------------------------------------------------------------
## 変数
# ------------------------------------------------------------
RESOURCE = ESiPCINIFileResourceBundle(__file__)

# ------------------------------------------------------------
## 関数
# ------------------------------------------------------------
def _(key, default, locale=None):
	try:
		return RESOURCE.get_string(key, default, locale)
	except:
		return default

# ------------------------------------------------------------
## クラス
# ------------------------------------------------------------
class MIKAN_IDT(MIKAN):
	pass

class AbstractMikanItemDBToolkit(AbstractMikan, MIKAN_IDT):

	# ----------------------------------------------------
	## リクエスト フィールドゲッター
	# @return 取得した値
	def get_request(self):
		return self.itemdb.request

	def get_item_db(self):
		return self.FItemDB

	def __init__(self, itemdb):
		super(AbstractMikanItemDBToolkit, self).__init__()

		self.FItemDB = itemdb

	# ----------------------------------------------------
	## Property
	request = ESiPCProperty(get_request, None, None)
	itemdb = ESiPCProperty(get_item_db, None, None)

# ------------------------------------------------------------
## メイン関数
# ------------------------------------------------------------
if __name__ == '__main__':
	pass

# ------------------------------------------------------------
